//
//  MineWalletRechageWithdrawCell.m
//  copyrightTrading
//
//  Created by 郭子一 on 2020/10/6.
//  Copyright © 2020 郭子一. All rights reserved.
//

#import "MineWalletRechageWithdrawCell.h"

@interface MineWalletRechageWithdrawCell ()

@property (nonatomic, strong) UILabel *titleLab;
@property (nonatomic, strong) UILabel *detailLab;

@end

@implementation MineWalletRechageWithdrawCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI
{
    self.titleLab = [UILabel new];
    self.titleLab.text = @"9999元";
    self.titleLab.font = JSS_MEDIUM_FONT(14);
    self.titleLab.textColor = RGB_VALUE(0xAAAAAA);
    [self.contentView addSubview:self.titleLab];
    [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.offset(0);
        make.right.offset(-kDeviceWidth/2);
        make.left.offset(22);
        make.height.mas_equalTo(20);
    }];
    
    self.detailLab = [UILabel new];
    self.detailLab.text = @"2020-09-20";
    self.detailLab.font = JSS_MEDIUM_FONT(14);
    self.detailLab.textColor = RGB_VALUE(0xAAAAAA);
    self.detailLab.textAlignment = NSTextAlignmentRight;
    [self.contentView addSubview:self.detailLab];
    [self.detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.offset(0);
        make.left.equalTo(self.titleLab.mas_left);
        make.right.offset(-22);
        make.height.mas_equalTo(20);
    }];
    
    UIView *lineView = [UIView new];
    lineView.backgroundColor = RGB_VALUE(0xDBDBDB);
    [self.contentView addSubview:lineView];
    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(22);
        make.right.offset(-22);
        make.height.mas_equalTo(1);
        make.bottom.offset(0);
    }];
}

- (void)setDataDic:(NSDictionary *)dataDic
{
    _dataDic = dataDic;
    self.titleLab.text = [NSString stringWithFormat:@"%@元",dataDic[@"money"]];
    self.detailLab.text = dataDic[@"create_at"];
}
@end
